//
//  NSString+JSON.m
//  ProfilePicture
//
//  Created by 张云江 on 2019/10/14.
//  Copyright © 2019年 张云江. All rights reserved.
//

#import "NSString+JSON.h"

@implementation NSString (JSON)

- (id)JSONObject
{
    NSError *error = nil;
    NSData *jsonData = [self dataUsingEncoding:NSUTF8StringEncoding];
    id object = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
    if (object && error == nil)
    {
        return object;
    }else
    {
        return nil;
    }
}

@end
